package com.renwei.yunlong.adapter;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Project :  yunaandroid.
 * Package name: com.renwei.yunlong.adapter
 * Created by :  Benjamin.
 * Created time: 2017/12/1 16:26
 * Changed by :  Benjamin.
 * Changed time: 2017/12/1 16:26
 * Class description:
 */

public class CompanyMsgPagerAdapter extends FragmentPagerAdapter {
    private List<Fragment> mFragments;
    final int PAGE_COUNT = 2;
    /**
     * Tab标题
     */
    private final String[] TITLE = new String[]{"我收到的", "我申请的"};
    private Context context;

    public CompanyMsgPagerAdapter(FragmentManager fm, Context context, List<Fragment> mFragments) {
        super(fm);
        this.context = context;
        this.mFragments = mFragments;
    }

    @Override
    public Fragment getItem(int position) {
        return mFragments.get(position);
    }

    @Override
    public int getCount() {
        return PAGE_COUNT;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return TITLE[position];
    }
}
